home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / Commander Sets / 4D Speech Pack / 4D Speech Pack.rsrc / TEXT_18898_†SP Features.txt < prev    next >
Encoding:
Text File  |  1994-09-14  |  2.7 KB  |  63 lines

  1. SP Features (featureflag) -> status
  2.  
  3. featureflag  integer      is a value to specify the feature you want to test
  4.                                    for. This can be one of the following values:
  5.                    0    SP Voice Pause, SP Voice Cont, SP Voice Stop
  6.                          accept -1 value and SP Voice reset available
  7.                    1    SP Voice code available
  8.                    2    SP Voice sound available
  9.                    3    SP VOICES ARRAY available
  10.                    4    SP SPEECH ON and SP SPEECH OFF available
  11.                    5    SP Channel available (not with this version)
  12.                    6    SP Pick Voice available
  13.                    7    Speech Deamon support available (not with this
  14.                          version)
  15.                     (all other values are reserved for future use and will
  16.                     return zero.)
  17. status         integer       returns either zero (0) or one (1), were the
  18.                                     value one means that the specified feature is
  19.                                     available with the current version of Speech
  20.                                     Pack.
  21.  
  22. This function provides information about the capabilities of the installed Speech Pack external package.
  23.  
  24. This function allows you to test if the installed version of Speech Pack has the features you expect it to have. This is especially useful when you have no control over the versions of Speech Pack installed with the data-base. And perhaps future versions of Speech Pack don't include all functions currently present in particular those who are experimental like SP Voice sound and SP Pick Voice. Ofcourse I try to avoid this but I can't look into the future and perhaps I need to split the external into several others‚Ķ
  25. However, this function does NOT indicate if the feature can actually be used. I.e. if the System configuration is correct to use the SP Voice sound function.
  26.  
  27. Example:
  28.   `a simple example to test if the SP VOICES ARRAY command is available:
  29.   $present := SP Features (3)
  30.  
  31.   `you may want to include this global procedure with your data-base.
  32.   `this is because this function wasn't implemented with Speech Pack
  33.   `2.0 and 2.1
  34.   `(I assume the chance is very low you will find Speech Pack 1.b2
  35.   `installed and that version is ignored here)
  36.  
  37.   `$1 holds the feature flag (integer)
  38.   `$0 returns the status as a boolean
  39.  
  40.   SP VERSION ($mgrvers;$packvers)
  41.  
  42.   Case Of
  43.    :($packvers = "2.0")
  44.      $0 := FALSE
  45.  
  46.    :($packvers = "2.1")
  47.      If ($1 = 0) | ($1 = 1) | ($1 = 2)
  48.        $0 := TRUE
  49.      Else
  50.        $0 := FALSE
  51.      End if
  52.  
  53.   Else
  54.     $0 := (SP Features ($1) = 1)
  55.  
  56.   End Case
  57.  
  58.   `if you expect to find beta-versions of Speech Pack you must test if
  59.   `the $packvers variable starts with "2.0" or "2.1".
  60.  
  61.  
  62.  
  63.